package com.huajx.hanvon.handler;

import Com.FirstSolver.Splash.FaceId_Item;
import com.huajx.core.message.RequestMessage;
import com.huajx.core.message.ResponseMessage;
import com.huajx.hanvon.Const;
import org.apache.mina.core.session.IoSession;

/**
 * 获取设备序列号
 *
 */
public class PostRecordHandler extends AbstractHanvonHandler {



    @Override
    public ResponseMessage handler(RequestMessage request) {
        // 获取设备序列号
        String SerialNumber = FaceId_Item.GetKeyValue(request.getMessage().toString(), "sn");
        request.getSession().setAttribute(Const.KEY_SERIALNUMBER, SerialNumber);

        return null;
    }

    @Override
    public void render(IoSession session) {
        session.write("Return(result=\"success\" postphoto=\"true\")");
    }
}
